/*
  The directives starting with # below ensures that this file is read by the compiler only once
  even if it is #included several times. It is call an "include guard"
*/
#ifndef ORDER_H_
#define ORDER_H_

//other types
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include "Order_Item.h"			
#include "Menu_Item.h"			
#include "Date.h"				//RCD A.2
#include "Time.h"				//uncomment once you have added the type definition
#include <string>
using namespace std;

struct Order {

public:
  //data
  
  // constructors
  Order () {}
  Order(int order, int server, int table, Date o_date, Time o_time);
  
  // utility functions
  string display() const;

  /*********************************************************************/
  /*Created or Modified by WEP*/
  /*new struct for C part, merge of menu items and order items*/
  /*********************************************************************/
	struct MenuAndOrder
	{
	public:
		int menu_itemId, order_id, order_quantity;
		float menu_itemPrice;
		string menu_itemName;

		MenuAndOrder(int mId, int ordId, float price, int qty, string name)
		{
			

			menu_itemId	= mId;
			menu_itemName = name;
			menu_itemPrice = price;
			order_quantity = qty;
			order_id = ordId;	
		}

		bool operator<(const MenuAndOrder& a) const  
		{
			return this->menu_itemPrice < a.menu_itemPrice;
		}
	};


 /*********************************************************************/
  /*End part by WEP*/
  /*********************************************************************/
  // non-modifying functions
  int order() const;
  int table() const;
  int server() const;
  Date o_date() const;
  Time o_time() const;
private:
  //constants
  
  // private data
  int order_id;
  int server_id;
  int table_id;
  Date order_date;	//RCD A.2
  Time order_time;  //uncomment once you have added the type definition
  


};



	
#endif //ORDER_H_
